#!/bin/bash
#set -x
for i in `printf "%c\n"  {b..z}  |head -n ${1}`
do
echo "$HOSTNAME mount disks /dev/vd${i}"
sudo parted -s /dev/vd${i} mklabel gpt mkpart 1 xfs 1 ${2} > /dev/null
sudo mkfs.xfs /dev/vd${i}1 > /dev/null
mkdir -p /mnt/${i}
#sudo mount -t xfs  /dev/vd${i}1  /mnt/${i}
echo "/dev/vd${i}1  /mnt/${i}                       xfs    defaults        1 1" |sudo tee -a /etc/fstab
done
sudo mount -a
